﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="TaskDetailV2.aspx.cs" Inherits="TaskDetailV2"  Title="检验任务详细内容"%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">

    <script type="text/javascript">
        //上传检验结果记录文件。
        function InvokePopUploadParFile(ctid,type)
        {
            var url= 'uploadfile2.aspx?task&pccid='+'<%=this.btnRefresh.ClientID%>'+'&CTID='+ctid+'&TaskType='+type ;
            window.open(url,'上传','height=340,width=600,resizable=yes');             
        } 
        //上传检验结果记录其他附件。
        function InvokePopUploadAttachment(ctid)
        {
            var url= 'uploadfile2.aspx?resultattachment&pccid='+'<%=this.btnRefresh.ClientID%>'+'&CTID='+ctid ;
            window.open(url,'上传','height=340,width=600,resizable=yes');             
        } 
        //查看合同详情。
        function DisplayContract(reportid)
        {
            var url= 'PCCInfo.aspx?'+reportid+"&Type=Display";
            window.open(url,'合同详情','height=600,width=800,resizable=yes');             
        } 
    </script>

    <h1 id="pagetitle" class="pagetitle">
        检验任务详细内容
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div class="anistyle" id="ani">
                    正在加载数据，请耐心等待...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    </h1>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <asp:Button ID="btnRefresh" runat="server" Text="隐藏刷新" OnClick="btnRefresh_Click" style="display:none;"/>
            <div runat="server" id="divResult" class="divResult">
                <asp:Label ID="OperationResult" CssClass="result" runat="server" Text=""></asp:Label>
            </div>
            <div>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr style="height: 24px;">
                        <td colspan="6" style="background-color: #f7f7f7;">
                            <img src="images/ul-style.gif" alt="" />
                            <b>任务详细内容</b></td>
                    </tr>
                    <tr style="height: 24px; border-bottom: solid 1px #F5F5F5;">
                        <td width="15%">
                            <b>任务编号:</b></td>
                        <td width="15%">
                            <asp:Label ID="labCTID" runat="server"></asp:Label></td>
                        <td width="15%">
                            <b>合同编号:</b></td>
                        <td width="15%">
                            <asp:HyperLink ID="labReportID" runat="server" style="cursor:hand;" ToolTip="点击查看合同详情"></asp:HyperLink></td>
                        <td width="15%">
                            <b>创建日期:</b></td>
                        <td width="25%">
                            <asp:Label ID="labAssignDate" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                    <tr style="height: 24px;">
                        <td style="height: 19px">
                            <b>下发人:</b></td>
                        <td style="height: 19px">
                            <asp:Label ID="labLeader" runat="server"></asp:Label></td>
                        <td style="height: 19px">
                            <b>主管实验员:</b></td>
                        <td style="height: 19px">
                            <asp:Label ID="labTester" runat="server"></asp:Label>
                            <asp:DropDownList ID="ddlTester" runat="server" Width="80%">
                            </asp:DropDownList>
                        </td>
                        <td style="height: 19px">
                            <b>任务类型:</b></td>
                        <td style="height: 19px">
                            <asp:Label ID="labCtType" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                    <tr style="height: 24px;">
                        <td>
                            <b>任务状态:</b></td>
                        <td>
                            <asp:Label ID="labStatus" runat="server"></asp:Label></td>
                        <td>
                            <b>任务开始时间:</b></td>
                        <td>
                            <asp:Label ID="labBegindate" runat="server"></asp:Label></td>
                        <td>
                            <b>任务结束时间:</b></td>
                        <td>
                            <asp:Label ID="labEndDate" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                    <tr style="height: 24px;">
                        <td>
                            <b>产品名称:</b></td>
                        <td>
                            <asp:Label ID="labPName" runat="server"></asp:Label></td>
                        <td>
                            <b>产品型号:</b></td>
                        <td>
                            <asp:Label ID="labPModel" runat="server"></asp:Label></td>
                        <td>
                            <b>产品参数:</b></td>
                        <td>
                            <asp:Label ID="labPType" runat="server"></asp:Label></td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                    <tr style="height: 24px;">
                        <td>
                            <b>检测结果文件:</b></td>
                        <td>
                            <asp:HyperLink ID="labCheckFile" runat="server" NavigateUrl=""></asp:HyperLink>
                            <asp:ImageButton ImageUrl="images/cross.gif" runat="server" ID="btnDeleteFile" OnClick="btnDeleteFile_Click" />
                            <asp:Literal runat="server" ID="btnClientUpload"></asp:Literal>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                    <tr style="height: 24px;">
                        <td>
                            <b>附件:</b></td>
                        <td>
                            <asp:Literal runat="server" ID="btnOtherAttachment"></asp:Literal>
                            <asp:Repeater ID="RepFile" runat="server">
                            <ItemTemplate>
                                <li>
                                <a href="getfile.aspx?fileid=<%#DataBinder.Eval(Container.DataItem, "File_ID")%>" target="_blank">
                                    <%#DataBinder.Eval(Container.DataItem, "File_Name")%>
                                </a>
                                </li>
                            </ItemTemplate>
                        </asp:Repeater>
                            <asp:Repeater ID="RepFileCanDel" runat="server" OnItemCommand="RepFileCanDel_OnItemCommand">
                            <ItemTemplate>
                                <li>
                                <a href="getfile.aspx?fileid=<%#DataBinder.Eval(Container.DataItem, "File_ID")%>" target="_blank">
                                    <%#DataBinder.Eval(Container.DataItem, "File_Name")%>
                                </a>
                                <asp:ImageButton ImageUrl="images/cross.gif" runat="server" ID="btnDeleteAttachment"  CommandName="del" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "File_ID") %>'/>
                                </li>
                            </ItemTemplate>
                            </asp:Repeater>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="6" style="height: 1px; background-color: #f5f5f5;">
                        </td>
                    </tr>
                </table>
            </div>
            <div style="height: 42px; line-height: 42px; text-align: center;">
                <asp:Panel runat="server" ID="panelLeader">
                    <asp:Button ID="btnAssign" runat="server" Text="下发任务" Height="24px" Width="104px" CssClass="btnbig" 
                        OnClick="btnAssign_Click" />
                    <asp:Button ID="btnReturnTask" runat="server" Text="退回" Height="24px" Width="104px" CssClass="btnbig" 
                        OnClick="btnReturnTask_Click" />
                    <asp:Button ID="btnLeaderConfirm" runat="server" Text="组长确认" Height="24px" Width="130px" CssClass="btnbig" 
                        OnClick="btnLeaderConfirm_Click" /></asp:Panel>
                <asp:Panel runat="server" ID="panelTester">
                    <asp:Button ID="btnStartTask" runat="server" Text="开始执行" Height="24px" Width="104px" CssClass="btnbig" 
                        OnClick="btnStartTask_Click" />
                    <asp:Button ID="btnComplete" runat="server" Text="确认任务完成" Height="24px" Width="130px" CssClass="btnbig" 
                        OnClick="btnComplete_Click" />
                        <asp:Button ID="Button_OK" runat="server" Text="确定" OnClick="Button_OK_Click"  CssClass="btnbig"    />
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
